from config.CommandParser import CommandParser
from service.ClashTrafficWebSocketClientService import ClashTrafficWebSocketClientService
from service.ClashWebSocketClientService import ClashWebsocketClientService
from service.WebsocketClientService import WebsocketClientService
import rel

if __name__ == "__main__":
    vo = CommandParser().parseArgs()
    clientService = WebsocketClientService(vo)
    clientService.start()
    cs = ClashWebsocketClientService(vo)
    cs.start()
    ts = ClashTrafficWebSocketClientService(vo)
    ts.start()
    rel.signal(2, rel.abort)
    rel.dispatch()
